package com.ltedu.common.contants;

/**
 * @className: AuthConstants
 * @auther: Jerry
 * @date: 2020/12/16 14:44
 * @desctiption: TODO
 * @version: 1.0
 */
public interface AuthConstants {

    /**
     * JWT存储权限前缀
     */
    String AUTHORITY_PREFIX = "ROLE_";

    /**
     * JWT存储权限属性
     */
    String AUTHORITY_CLAIM_NAME = "authorities";

    /**
     * 认证信息Http请求头
     */
    String AUTHORIZATION = "Authorization";

    /**
     * Bearer
     */
    String JWT_TOKEN_PREFIX = "Bearer ";

    /**
     * JWT载体key
     */
    String USER_KEY = "user";

    /**
     * user_id key
     */
    String USER_ID_KEY = "id";

    /**
     * client_id key
     */
    String CLIENT_ID_KEY = "client_id";

    /**
     * Redis缓存权限规则key
     */
    String RESOURCE_ROLES_KEY = "auth:resourceRoles";
}
